from pro_data import DataSets
from utils.utiils_perf import *
from sklearn.ensemble import RandomForestClassifier

def rf_func(data_train, data_test, label_train):

    model = RandomForestClassifier(n_estimators=100,
                                   bootstrap=True,
                                   max_features='sqrt')
    model.fit(data_train, label_train)
    pred_test = model.predict(data_test)

    return pred_test

if __name__ == "__main__":
    path_x = "../data/data2_naca0012/dv.csv"
    path_y = "../data/data2_naca0012/fc.csv"

    ds = DataSets(path_x=path_x,
                  path_y=path_y,
                  label_index=2,
                  label_threshold=-0.16,
                  test_proportion=0.1)

    loop_cls(ds, rf_func, 10)
